<?php
include_once '../conn.php';

if (isset($_POST['id'])){
    $id = $_POST['id'];
    $query = "DELETE FROM equipo WHERE id = " . $id;

    if ($conn->query($query)){
        $json['exito'] = true;
    } else {
        $json['mensaje'] = $conn->error;
        $json['exito'] = false;
    }
} else {
    $json['mensaje'] = " No hay id";
    $json['exito'] = false;
}
echo json_encode($json);

?>